#pragma once
#include <iostream>
#include "util.hpp"
namespace lh_log
{
    using namespace lh_util;
    enum
    {
        INFO,
        DEBUG,
        WARNING,
        ERROR,
        FATAL
    };
    std::ostream &Log(const std::string &level, const std::string &filename, int line)
    {
        std::string massage;
        massage += "[";
        massage += level;
        massage += "]";

        massage += "[";
        massage += filename;
        massage += "]";

        massage += "[";
        massage += std::to_string(line);
        massage += "]";

        massage += "[";
        massage += TimeUtil::GetTimeStamp();
        massage += "]";

        std::cout << massage;
        return std::cout;
    }
#define LOG(level) Log(#level, __FILE__, __LINE__)
}